package com.zhitian.data;

import java.io.IOException;

public class DataUtils {
	
	
	/**
	 * 
	 * @param platform    取证平台 平航/美亚
	 * @param path        报告路径
	 * @param csvOutPath  csv文件导出路径
	 * @param applist
	 * @param contacts
	 * @param callsRecord
	 * @param message
	 * @param wechat
	 * @param QQ
	 * @param alipay
	 * @param systemInfo
	 * @throws IOException 
	 */
	public static void generateCsv(String platform,String path,String csvOutPath,boolean get_applist,boolean get_contacts,
			boolean get_callsRecord,boolean get_message,boolean get_wechat,boolean get_QQ,
			boolean get_alipay,boolean get_systemInfo) throws IOException {
		
		switch (platform) {
		case "平航":
			Pinghang.getDataInCsv(path, csvOutPath,get_applist,get_contacts,
					get_callsRecord,get_message,get_wechat,get_QQ,
					get_alipay,get_systemInfo);
			break;
		case "美亚":
			Meiya.outCsv(path, csvOutPath,get_applist,get_contacts,
					get_callsRecord,get_message,get_wechat,get_QQ,
					get_alipay,get_systemInfo);
			break;
		case "RH6900":
			RH6900.outCsv(path, csvOutPath,get_applist,get_contacts,
					get_callsRecord,get_message,get_wechat,get_QQ,
					get_alipay,get_systemInfo);
		default:
			break;
		}
		
	}
	public static void main(String[] args) {
		
		long start = System.currentTimeMillis();
		String path = "D:\\AHTMLDATA\\黄小雨862373030759292_20180207213918_报告\\Content\\";
		String csvOutPath = "D:\\csvPath2\\";
		
		try {
			generateCsv("平航", path, csvOutPath, true, true, true, true, false, false, false, true);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		long end = System.currentTimeMillis();
		System.out.println("共耗时："+(end-start)+"(ms)");
	}

}
